home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / demos / programme / StormC / StormC Install-Script english < prev    next >
Encoding:
Text File  |  1998-10-06  |  12.2 KB  |  819 lines

  1. ; $VER: StormC V1.1 Install Version 1.06 (22.7.96)
  2.  
  3. ; Installations-Script 
  4.  
  5. ; (c) 1996 HAAGE & PARTNER Computer GmbH
  6.  
  7.  
  8.  
  9. (complete 0)
  10.  
  11.  
  12.  
  13. ; Die Versionsnummer und das Erstellungs-Datum der hier installierten
  14.  
  15. ; Versionen.
  16.  
  17.  
  18.  
  19. (set stcpp-version "1.1")
  20.  
  21. (set stcpp-date "(17 Juli 96)")
  22.  
  23.  
  24.  
  25. ;====================================================================
  26.  
  27. ; Initialisierungen
  28.  
  29.  
  30.  
  31.  
  32.  
  33. (set @default-dest "")
  34.  
  35.  
  36.  
  37. (set os-version (/ (getversion) 65536))
  38.  
  39. (set os-13 (< os-version 36))
  40.  
  41. (set os-20 (>= os-version 36))
  42.  
  43. (set os-21 (>= os-version 38))
  44.  
  45.  
  46.  
  47. (set totalmem (database "total-mem")) ; Diese schöne Funktion vereinfacht einiges
  48.  
  49.  
  50.  
  51. ; Die Pfadnamen der Programme, die vom Installations-Skript aufgerufen werden.
  52.  
  53.  
  54.  
  55. ; Die Pfadnamen der einzelnen Quell-Dateien.
  56.  
  57.  
  58.  
  59. (set #binsource             (tackon (pathonly @icon) "StormSYS"))    ; Hier stehen die Ausführbaren Programme
  60. (set #includesource         (tackon (pathonly @icon) "INCLUDE"))     ; Hier stehen die Includes
  61. (set #envsource            (tackon (pathonly @icon) "ENV"))            ; Die Voreinstellungen
  62. (set #libsource            (tackon (pathonly @icon) "LIB"))            ; Hier stehen die Bibliotheken
  63. (set #wizlib               (tackon (pathonly @icon) "LIBS/Wizard.library")); Hier steht die Bibliohtek
  64. (set #samplesource        (tackon (pathonly @icon) "Examples"))    ; Hier stehen die Demo-Sourcen
  65. (set #manualsource        (tackon (pathonly @icon) "MANUAL"))        ; Hier steht die Dokumentation
  66. (set #toolssource       (tackon (pathonly @icon) "TOOLS"))        ; Hier stehen die Tools
  67. (set #flibsource        (tackon (pathonly @icon) "Fast-Ansi-Lib")) ; Hier steht die neue Ansi-lib
  68. (set #muilibsource      (tackon (pathonly @icon) "Mui-Class-Lib")) ; Hier steht die Mui Klassen-Library
  69. (set source-Liesmich     (tackon (pathonly @icon) "Readme"))        ; Die Liesmich Datei 
  70. (set source-readme        (tackon (pathonly @icon) "Readme"))        ; Die Liesmich Datei 
  71. (set source-italreadme     (tackon (pathonly @icon) "Leggimi"))        ; Die Liesmich Datei 
  72. (set source-ikon        (tackon (pathonly @icon) "StormCPP.info"))    ; Das Programm-Piktogramm
  73.  
  74.  
  75. (set #prp-copy-samples
  76.     "Copying C and C++ examples...")
  77.  
  78. (set #hlp-copy-samples
  79.     "Use the manual and the examples to get a quick start with StormC")
  80.  
  81. (set #prp-copy-env
  82.     "Copying the StormC default icons...")
  83.  
  84. (set #hlp-copy-env
  85.     "The icons are used by the project management and by the editor")
  86.  
  87. (set #prp-copy-includes
  88.     "Copying the C++ includes...")
  89.  
  90. (set #hlp-copy-includes
  91.     "The includes are needed by the preprocessor of the compiler")
  92.  
  93. (set #prp-copy-libs
  94.     "Copying the linker libraries...")
  95.  
  96. (set #hlp-copy-libs
  97.     "These libraries are used by the linker")
  98.  
  99. (set #prp-copy-manual
  100.     "Copying the documentation...")
  101.  
  102. (set #hlp-copy-manual
  103.     "This is an Amiga Guide file for StormC")
  104.  
  105. (set #prp-copy-bin
  106.     "Copying the executables of StormC...")
  107.  
  108. (set #hlp-copy-bin
  109.     "If this is your first time insatallation of StormC, you should copy everything!")
  110.  
  111. (set #prp-copy-tools
  112.     "Copying the Screentool...")
  113.  
  114. (set #hlp-copy-tools
  115.     "This is an Screenmanager-Commodity for StormC")
  116.  
  117. (set #prp-copy-wizlib
  118.    "Copying the Wizard.Library")
  119.  
  120. (set #hlp-copy-wizlib
  121.    "The Library makes very short programms!")
  122.  
  123. (set #prp-copy-fastlib
  124.    "Copying the FAST-ANSI-Library")
  125.  
  126. (set #hlp-copy-fastlib
  127.    "With it you can generate fast ANSI-C programms.")
  128.  
  129. (set #prp-copy-muilib
  130.    "Copying the Mui Klassen-Library")
  131.  
  132. (set #hlp-copy-muilib
  133.    "The library makes it possible to program MUI with C++")
  134.     
  135.  
  136. ; Die Dateigroessen
  137.  
  138. (set size-stormcpp            24000)
  139. (set size-stormc                437000)
  140. (set size-stormed                210000)
  141. (set size-stormshell              340000)
  142. (set size-stormrun            220000)
  143. (set size-stormasm            36000)
  144. (set size-stormpics            50000)
  145. (set size-stormlex            100000)
  146. (set size-libs                    520000)
  147. (set size-inlcudes            270000)
  148. (set size-demos                70000)
  149. (set size-fastlib          130000)
  150. (set size-muilib           480000)
  151.  
  152. (set size-komplett    ( + size-fastlib size-muilib size-stormrun size-stormasm size-stormcpp size-stormc size-stormed size-stormshell size-stormpics size-stormlex size-libs size-inlcudes size-demos))
  153.  
  154.  
  155.  
  156. ; ----------------------------- Prozeduren ------------------------------
  157.  
  158.  
  159.  
  160. (Procedure Make_Folder
  161.  
  162.     (
  163.  
  164.     (set folder (tackon folder "StormC"))
  165.  
  166.     (if (= (exists folder) 0)
  167.  
  168.        (
  169.  
  170.        (makedir folder (infos))
  171.  
  172.        )
  173.  
  174.     ))
  175.  
  176. )
  177.  
  178.  
  179.  
  180. ;=====================================================================================
  181.  
  182. ; Beginn der Installation
  183.  
  184. ;=====================================================================================
  185.  
  186.  
  187.  
  188. ; Eine kleine Einleitung, gefolgt vom Startbild des Installers.
  189.  
  190.  
  191.  
  192. (set act-user-level @user-level)
  193.  
  194. (user 1)
  195.  
  196.  
  197.  
  198. (message (cat    "\nWelcome to the installation of the \n\n\"StormC demo "
  199.  
  200.                      stcpp-version " of the "stcpp-date "\"!\n\n"
  201.  
  202.                     "This script copies the files needed by StormC "
  203.  
  204.                     "to your harddisk.\n"))
  205.  
  206.  
  207.  
  208. (user act-user-level)
  209.  
  210. (welcome)
  211.  
  212.  
  213.  
  214. (complete 5)
  215.  
  216.  
  217.  
  218. (set act-user-level @user-level)
  219.  
  220. (user 1)
  221.  
  222.  
  223.  
  224.  
  225.  
  226. ;    Alte Version pruefen und entsprechende Warnung ausgeben! **************************************************************
  227.  
  228.  
  229.  
  230. (set folder "WORK:StormC")
  231.  
  232.  
  233.  
  234. (if (exists "StormC:" (noreq))
  235.  
  236.     (
  237.  
  238.         (message (cat    "\nThere is already and installation of StormC\n"
  239.  
  240.                         "on your harddisk! Please select the parent\n"
  241.  
  242.                         "directory or the volume if you want to update\n"
  243.  
  244.                         "your old StormC installation!"))
  245.  
  246.  
  247.  
  248.     (set folder (getassign "STORMC"))
  249.  
  250.     )
  251.  
  252. )
  253.  
  254.  
  255.  
  256. (set cmpstr (getassign "STORMC"))
  257.  
  258.  
  259.  
  260. (user act-user-level)
  261.  
  262.  
  263.  
  264. (if (= @user-level 0)
  265.  
  266.     (
  267.  
  268.     (user 1)
  269.  
  270.     (message (cat    "The ENTRY mode needs a minimum of 5 MB of free harddisk space."
  271.  
  272.                         "Please select a drawer/volume for your StormC installation"
  273.  
  274.                         "\n\n"
  275.  
  276.                         "All other settings will be done by the installation "
  277.  
  278.                         "script to fit your system."))))
  279.  
  280.  
  281.  
  282. (set ok 0)
  283.  
  284. (while (not ok)
  285.  
  286.     (set folder
  287.  
  288.         (askdir
  289.  
  290.             (prompt (cat "\n"
  291.  
  292.                              "Select a path for your StormC installation.\n"
  293.  
  294.                              "A drawer named StormC will be created!"))
  295.  
  296.             (help (cat    "    You will get an overview of all volumes with 'Show drives' "
  297.  
  298.                             "Form this list you should select the first, non colored, items. "
  299.  
  300.                             "only\n"
  301.  
  302.                             "    Typical names are \"WORK:\", \"HD0:\" or \"DH0:\"; "
  303.  
  304.                             "do not use such names as \"DF0:\", \"DF1:\", "
  305.  
  306.                             "\"DF2:\", \"DF3:\", \"RAD:\", \"RAM:\", \"System2.0:\", "
  307.  
  308.                             "\"WB_2.x:\", \"System3.0:\" or \"WB_3.x:\"!"
  309.  
  310.                             "\n\n"
  311.  
  312.                             "The Storm C installation can not be placed on a volume directly. "
  313.  
  314.                             "You have to select a drawer. Ohterwise an error will be shown. "
  315.  
  316.                             "\n\n"
  317.  
  318.                             @askdir-help))
  319.  
  320.             (default folder)
  321.  
  322.             (disk)
  323.  
  324.         )
  325.  
  326.     )
  327.  
  328.  
  329.  
  330.    (Make_Folder)    ; // Automatisch neues Verzeichnis anlegen!
  331.  
  332.  
  333.  
  334.     ; Ist der Dateiname leer oder endet mit einem ':' oder existiert unter
  335.  
  336.     ; diesem Namen kein Verzeichnis, wird eine Fehlermeldung angezeigt; andernfalls
  337.  
  338.     ; kann die Auswahl-Schleife beendet werden.
  339.  
  340.     (if (or (or (or (<= (strlen folder) 0) (= (substr folder (- (strlen folder) 1) 1) ":")) (= (exists folder (noreq)) 0)) (= (getdiskspace folder) -1))
  341.  
  342.         (message (cat    "\nYour selection \"" folder "\" is not a valid "
  343.  
  344.                             "drawer !\n\n"
  345.  
  346.                             "Use 'Show drives' to get a list of all volumes. "
  347.  
  348.                             " Form this list you should only select the first, non color, items. "
  349.  
  350.                             "\n"
  351.  
  352.                             "Use \"New drawer...\" to create a new drawer on the current "
  353.  
  354.                                "volume."))
  355.  
  356.         ;else
  357.  
  358.         (
  359.  
  360.             (set freediskspace (getdiskspace folder))    ; Der freie Speicher auf diesem Medium
  361.  
  362.  
  363.  
  364.             (if (< freediskspace size-komplett)
  365.  
  366.                 (
  367.  
  368.                 (user 1)
  369.  
  370.                 (message (cat    "\nThe is not enough free space on the volume you "
  371.  
  372.                                             "selected for the complete installation of StormC. "
  373.  
  374.                                             "\n\n"
  375.  
  376.                                             "Free diskspace " freediskspace "!\n"
  377.  
  378.                                             "diskspace needed " size-komplett "!\n\n"
  379.  
  380.                                             "Please select another volume !"))                
  381.  
  382.                 )
  383.  
  384.             ;else
  385.  
  386.             (set ok 1)
  387.  
  388.             )
  389.  
  390.         )
  391.  
  392.     )
  393.  
  394. )
  395.  
  396.  
  397.  
  398. (makeassign "STORMC")
  399.  
  400.  
  401.  
  402. (user act-user-level)
  403.  
  404.  
  405.  
  406. (set @default-dest folder)    ; Die Zuweisung ist sehr wichtig!
  407.  
  408.  
  409.  
  410. (set destbin    (tackon folder "StormSYS"))
  411.  
  412. (if                                          ; Compiler-Verzeichnis erzeugen
  413.  
  414.     (= (exists destbin) 0)
  415.  
  416.     (makedir destbin (infos))
  417.  
  418. )
  419.  
  420.  
  421.  
  422. (set destdemo    (tackon folder "Examples"))
  423.  
  424. (if                                          ; Demo-Verzeichnis erzeugen
  425.  
  426.     (= (exists destdemo) 0)
  427.  
  428.     (makedir destdemo (infos))
  429.  
  430. )
  431.  
  432. (set destinclude (tackon folder "Include"))
  433.  
  434. (if                                          ; Includes-Verzeichnis erzeugen
  435.  
  436.     (= (exists destinclude) 0)
  437.  
  438.     (makedir destinclude)
  439.  
  440. )
  441.  
  442.  
  443.  
  444. (set destlib    (tackon folder "Lib"))
  445.  
  446. (if                                          ; Libraries-Verzeichnis erzeugen
  447.  
  448.     (= (exists destlib) 0)
  449.  
  450.     (makedir destlib)
  451.  
  452. )
  453.  
  454.  
  455.  
  456. (set destmanual    (tackon folder "Manual"))
  457.  
  458. (if                                          ; Dokumentations-Verzeichnis erzeugen
  459.  
  460.     (= (exists destmanual) 0)
  461.  
  462.     (makedir destmanual (infos))
  463.  
  464. )
  465.  
  466. (set desttools    (tackon folder "Tools"))
  467.  
  468. (if                                          ; Tools-Verzeichnis erzeugen
  469.  
  470.     (= (exists desttools) 0)
  471.  
  472.     (makedir desttools (infos))
  473.  
  474. )
  475.  
  476. (set fansilib    (tackon folder "Fast-ANSI-Lib"))
  477.  
  478. (if                                          ;Fastansilib-Verzeichnis erzeugen
  479.     (= (exists fansilib) 0)
  480.     (makedir fansilib (infos))
  481. )
  482.  
  483. (set muilib    (tackon folder "MUI-Class-Lib"))
  484.  
  485. (if                                          ;Muilib-Verzeichnis erzeugen
  486.     (= (exists muilib) 0)
  487.     (makedir muilib (infos))
  488. )
  489.  
  490. (complete 5)
  491.  
  492.  
  493.  
  494. ; Liesmich Datei auf Festplatte kopieren!
  495.  
  496.  
  497. (copyfiles
  498.  
  499.     (source source-Liesmich)
  500.  
  501.     (dest folder)
  502.  
  503.     (infos)
  504.  
  505. )
  506.  
  507. (copyfiles
  508.     (source source-readme)
  509.     (dest folder)
  510.     (infos)
  511. )
  512.  
  513. (copyfiles
  514.     (source source-italreadme)
  515.     (dest folder)
  516.     (infos)
  517. )
  518.  
  519. (complete 8)
  520.  
  521.  
  522.  
  523. (set morerunpath "run C/More Readme")
  524.  
  525.  
  526.  
  527. (run morerunpath)    ; Liesmich laden
  528.  
  529.  
  530.  
  531. (complete 10)
  532.  
  533.  
  534.  
  535. (set destinfo    (tackon folder "StormCPP.info"))
  536.  
  537. (if                                          ; Projekt-Ikon erzeugen
  538.     (= (exists destinfo) 0)
  539.     (
  540.     (copyfiles
  541.         (source source-ikon)
  542.         (dest folder)
  543.     ))
  544. )
  545.  
  546.  
  547.  
  548. (complete 15)
  549.  
  550.  
  551.  
  552. (copyfiles                                            ; Beispiele kopieren
  553.  
  554.     (prompt #prp-copy-samples)
  555.  
  556.     (help #hlp-copy-samples)
  557.  
  558.     (source #samplesource)
  559.  
  560.     (dest destdemo)
  561.  
  562.     (all)
  563.  
  564.     (confirm)
  565.  
  566. )
  567.  
  568.  
  569.  
  570. (complete 20)
  571.  
  572.  
  573.  
  574. (copyfiles                                            ; Settings kopieren
  575.  
  576.     (prompt #prp-copy-env)
  577.  
  578.     (help #hlp-copy-env)
  579.  
  580.     (source #envsource)
  581.  
  582.     (dest "ENVARC:")
  583.  
  584.     (all)
  585.  
  586.     (confirm)
  587.  
  588. )
  589.  
  590.  
  591.  
  592. (complete 22)
  593.  
  594.  
  595.  
  596. (copyfiles                                            ; Settings kopieren
  597.  
  598.     (prompt #prp-copy-env)
  599.  
  600.     (help #hlp-copy-env)
  601.  
  602.     (source #envsource)
  603.  
  604.     (dest "ENV:")
  605.  
  606.     (all)
  607.  
  608.     (confirm)
  609.  
  610. )
  611.  
  612.  
  613.  
  614. (complete 25)
  615.  
  616.  
  617.  
  618. (copyfiles                                            ; Compiler kopieren
  619.  
  620.     (prompt #prp-copy-bin)
  621.  
  622.     (help #hlp-copy-bin)
  623.  
  624.     (source #binsource)
  625.  
  626.     (dest destbin)
  627.  
  628.     (all)
  629.  
  630.     (confirm)
  631.  
  632. )
  633.  
  634.  
  635.  
  636. (complete 40)
  637.  
  638.  
  639.  
  640. (copyfiles                                            ; Includes kopieren
  641.  
  642.     (prompt #prp-copy-includes)
  643.  
  644.     (help #hlp-copy-includes)
  645.  
  646.     (source #includesource)
  647.  
  648.     (dest destinclude)
  649.  
  650.     (all)
  651.  
  652.     (confirm)
  653.  
  654. )
  655.  
  656.  
  657.  
  658. (complete 60)
  659.  
  660.  
  661.  
  662. (copyfiles                                            ; Libs kopieren
  663.  
  664.     (prompt #prp-copy-libs)
  665.  
  666.     (help #hlp-copy-libs)
  667.  
  668.     (source #libsource)
  669.  
  670.     (dest destlib)
  671.  
  672.     (all)
  673.  
  674.     (confirm)
  675.  
  676. )
  677.  
  678.  
  679.  
  680. (complete 80)
  681.  
  682.  
  683.  
  684. (copyfiles                                            ; Manual kopieren
  685.  
  686.     (prompt #prp-copy-manual)
  687.  
  688.     (help #hlp-copy-manual)
  689.  
  690.     (source #manualsource)
  691.  
  692.     (dest destmanual)
  693.  
  694.     (all)
  695.  
  696.     (confirm)
  697.  
  698. )
  699.  
  700. (complete 90)
  701.  
  702.  
  703.  
  704. (copyfiles                                            ; Tools kopieren
  705.  
  706.     (prompt #prp-copy-tools)
  707.  
  708.     (help #hlp-copy-tools)
  709.  
  710.     (source #toolssource)
  711.  
  712.     (dest desttools)
  713.  
  714.     (all)
  715.  
  716.     (confirm)
  717.  
  718. )
  719.  
  720. (complete 91)
  721.  
  722.  
  723. (copyfiles                                            ; Fastlib kopieren
  724.     (prompt #prp-copy-fastlib)
  725.     (help #hlp-copy-fastlib)
  726.     (source #flibsource)
  727.     (dest fansilib)
  728.     (all)
  729.     (confirm)
  730. )
  731.  
  732. (complete 92)
  733.  
  734. (copyfiles                                            ; Muilib kopieren
  735.     (prompt #prp-copy-muilib)
  736.     (help #hlp-copy-muilib)
  737.     (source #muilibsource)
  738.     (dest muilib)
  739.     (all)
  740.     (confirm)
  741. )
  742.  
  743. (complete 93)
  744.  
  745.  
  746. (copylib                                            ; Wizard.library kopieren
  747.     (prompt #prp-copy-wizlib)
  748.     (help #hlp-copy-wizlib)
  749.     (source #wizlib)
  750.     (dest "LIBS:")
  751.     (confirm)
  752. )
  753.  
  754. (complete 96)
  755.  
  756.  
  757.  
  758. ; ------- STARTUP ÄNDERN
  759.  
  760.  
  761.  
  762. (set command1 (cat  "ASSIGN STORMC: " folder ""))
  763.  
  764.  
  765.  
  766. (set command1.txt
  767.  
  768.     (cat 
  769.  
  770.          "\n\n\nThere User-Startup must be changed to get StromC "
  771.  
  772.       "work right.\n\n"
  773.  
  774.          command1
  775.  
  776.     )
  777.  
  778. )
  779.  
  780.  
  781.  
  782. (startup "StormC"
  783.  
  784.     (prompt command1.txt)
  785.  
  786.     (help #help-startup)
  787.  
  788.     (command command1)
  789.  
  790. )
  791.  
  792.  
  793.  
  794. (makeassign "STORMC")
  795.  
  796. (makeassign "STORMC" folder)
  797.  
  798.  
  799. (complete 100)
  800.  
  801.  
  802.  
  803. ; ------- FERTIG
  804.  
  805.  
  806.  
  807. (message (cat 
  808.  
  809.     "\nInstallation of StormC is done.\n"
  810.  
  811.    "When the lines:\n" command1 "\nare not inserted in your Startup-Sequence or "
  812.  
  813.    "User-Startup, please do it by your own.\n\n"
  814.  
  815.    "\n\nBest wishes ... ")
  816.  
  817. )
  818.  
  819.